package com.base.framework.web.action.hello;

import java.util.List;

import com.base.framework.domain.model.User;
import com.base.framework.service.TestS;
import com.base.framework.service.impl.ITest;
import com.base.framework.web.action.BaseController;
import com.base.framework.web.action.aop.ServiceInterceptor;
import com.base.framework.web.action.valid.UserValidator;
import com.jfinal.aop.Before;
import com.jfinal.ext.sql.Criteria;
import com.jfinal.ext.sql.Criterion;
import com.jfinal.plugin.activerecord.tx.Tx;

@Before( ServiceInterceptor.class)
public class HelloController extends BaseController {
	@Before(UserValidator.class)
	public void sayHi() {
//		Criterion ex = Criterion.fromEntityClass(User.class);
//		ex.nb(User.USERID, 2, 9);
//		List<User> u = ex.find();
//		Criteria criteria=Criteria.fromEntityClass(User.class);
//		List<User> u = criteria.addExpr(Criterion.ne(User.USERID, 5)).find();
		TestS test=new ITest();
		test.sayHi();
		renderJson("dsaf");
		
	}
}
